//
//  PosterDetailView.m
//  卢卡的时光网
//
//  Created by 卡神 on 15/7/25.
//  Copyright © 2015年 lok. All rights reserved.
//

#import "PosterDetailView.h"
#import "UIImageView+WebCache.h"

@implementation PosterDetailView


-(void)setModel:(MoiveInformation *)model {
    _model = model;
    [self setNeedsLayout];
}

- (void)layoutSubviews {
    NSString *str = [_model.images valueForKey:@"large"];
    [self.image sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:[UIImage imageNamed:@"11"]];
    self.title.text = [NSString stringWithFormat:@"中文名: %@", _model.title];
    self.english.text = [NSString stringWithFormat:@"原名: %@", _model.english];

    self.year.text = [NSString stringWithFormat:@"年份: %@", _model.year];
    
    self.starView.average = _model.average;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
